﻿@model IEnumerable<TracNghiem.Areas.Admin.Models.ReportsModel>
<div align="center">
    <h1>
        BÁO CÁO CÂU HỎI</h1>
</div>
<div class="container_12">
    <div class="grid_12">
        @using (Html.BeginForm("FindReports", "Reports", FormMethod.Post, new { id = "FindReports", name = "FindReports" }))
        {
            <div style="padding-left: 5px; margin-bottom: 5px; text-align: left; width: 40%">
                <lable style="margin-right: 3px">Dịch vụ: </lable>
                @*@if (ViewBag.dichvu_id != null)
                {                               
                    @Html.DropDownList("service_id", ViewBag.dichvu_id as SelectList, "---Chọn dịch vụ---", new { style = "margin-left:17px" })          
                }*@
                <select id="service_id" name="service_id" style="margin-left: 17px">
                    @Html.Raw(ViewBag.theanh);
                </select>
            </div>
             
            <div class="bottom-spacing">
                <input class="submit-green" type="submit" value="Tìm kiếm" style="width: 8.5%; padding-left: 3px" />
            </div> 
            <div class="bottom-spacing">
                <a href="@Url.Action("Export_Excel", "Reports")">Export Excel</a>
            </div>
        }
        <div class="module">
            <h2>
                <span></span>
            </h2>
            <div class="module-table-body">
                <div class="scrolling">
                    <div class="data-table" style="width: 120%">
                        <table id="myTable" class="tablesorter">
                            <thead>
                                <tr>
                                    <th style="width: 5%">
                                        STT
                                    </th>
                                    <th style="width: 15%">
                                        Tên dịch vụ
                                    </th>
                                    <th style="width: 15%">
                                        Phân loại
                                    </th>
                                    <th style="width: 15%">
                                        Câu hỏi
                                    </th>
                                    <th style="width: 20%">
                                        Số lần đúng
                                    </th>
                                    <th style="width: 10%">
                                        Số lần thi
                                    </th>
                                    <th style="width: 10%">
                                        Tỷ lệ
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                @{int stt = 0;}
                                @foreach (var item in Model)
                                {
                                    stt++;                                         
                                        
                                    <tr>
                                        <td>@stt
                                        </td>
                                        <td>@Html.DisplayFor(modelItem => item.ten_dich_vu)
                                        </td>
                                        <td>@Html.DisplayFor(modelItem => item.ten_phan_loai)
                                        </td>
                                        <td>@Html.DisplayFor(modelItem => item.name)
                                        </td>
                                        <td>@Html.DisplayFor(modelItem => item.cau_dung)
                                        </td>
                                        <td>@Html.DisplayFor(modelItem => item.tong)
                                        </td>
                                        <td>@(Math.Round((Convert.ToDecimal(item.cau_dung) / Convert.ToDecimal(item.tong)), 2) * 100)%
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="pager" id="pager">
                    <form action="">
                    <div>
                        <img class="first" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-stop-180.gif")"/>
                        <img class="prev" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-180.gif")"/>
                        <input type="text" class="pagedisplay input-short align-center" />
                        <img class="next" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow.gif")"/>
                        <img class="last" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-stop.gif")"/>
                        <select class="pagesize input-short align-center">
                            <option value="10" selected="selected">10</option>
                            <option value="20">20</option>
                            <option value="30">30</option>
                            <option value="40">40</option>
                        </select>
                    </div>
                    </form>
                </div>
                <div style="clear: both">
                </div>
            </div>
            <!-- End .module-table-body -->
        </div>
        <!-- End .module -->
    </div>
    <!-- End .grid_12 -->
</div>
<!-- End .container_12 -->

